﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 形成性考核2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入判断的年号");//获取年号
            int year;
            year = Convert.ToInt32(Console.ReadLine());
            if (year % 4 == 0)//第一层嵌套
            {
                if (year % 100 != 0)//第二层嵌套
                {
                    Console.WriteLine(year + "是闰年");
                }
                else
                {
                    Console.WriteLine(year + "不是闰年");
                }
            }
            else if (year % 400 == 0)
            {
                Console.WriteLine(year + "是闰年");
            }
            else
            {
                Console.WriteLine(year + "不是闰年");
            }
            Console.ReadKey();
        }
    }
}

//  else if (year % 400 == 0)
//{
//    Console.WriteLine(year + "是闰年");
//}
//else
//{
//    Console.WriteLine(year + "不是闰年");
//}
//Console.ReadKey();